<script  setup>

import { useRouter } from 'vue-router'
import auth from "@/utils/auth.js";
import {ElMessage} from "element-plus";

import { onMounted } from "vue";

onMounted(()=> {
  document.title = '学习堵智能教育平台-教师端'
})

const router = useRouter()
const handleMenuSelect = (index) => {
  // 根据菜单索引跳转到对应路由
  const pathMap = {
    '1':'/teacher/class/all',
    '2':'/teacher/class/type',
    '3':'/teacher/class/mc',
    '4':'/teacher/class/ms'
  }
  router.push(pathMap[index])
}

</script>

<template>

  <el-menu
      :default-active="'1'"
  class="el-menu-demo"
  mode="horizontal"
  @select="handleMenuSelect"
  >

  <el-menu-item index="1">全部课程</el-menu-item>
  <el-menu-item index="2">课程种类</el-menu-item>
  <el-menu-item index="3">我要排课</el-menu-item>
  <el-menu-item index="4">我的课表</el-menu-item>



  </el-menu>
  <el-main>
    <router-view />
  </el-main>


</template>


<style scoped>

</style>